From: Georges Basile Stavracas Neto Date: Wed, 20 May 2020 19:22:36 +0000 (-0300) Subject: appDisplay: Don't destroy FolderView directly X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~684^2^2~226 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=3c3c3b7c69b14819a95d893dfb5a451614e0ad5d;p=gnome-shell.git appDisplay: Don't destroy FolderView directly When FolderIcon is destroyed, it destroyed the FolderView and, if there's a folder dialog present, it destroys the dialog as well. Turns out, the folder dialog adds the icon's FolderView to itself. The view becomes part of the dialog's actor tree. When the dialog is destroyed, it also tries to destroy the view - but the folder view was already destroyed by FolderIcon! Fix that by letting the dialog destroy the folder view if it exists, otherwise destroy the folder view directly. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1271 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index f50d9158c..76546c887 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -1175,15 +1175,15 @@ var FolderIcon = GObject.registerClass({ this._dragMonitor = null; } - this.view.destroy(); + if (this._dialog) + this._dialog.destroy(); + else + this.view.destroy(); if (this._folderChangedId) { this._folder.disconnect(this._folderChangedId); delete this._folderChangedId; } - - if (this._dialog) - this._dialog.destroy(); } vfunc_clicked() {